/**
 * Main application routes
 */

'use strict';

import errors from './components/errors';
import path from 'path';

export default function(app) {
  app.use('/auth', require('./auth'));
  app.use('/components', require('./components/components.route'));
  app.use('/ajax/user', require('./ajax/user/user.route'));
  app.use('/ajax/blog', require('./ajax/blog/blog.route'));
  
  app.route('/')
    .get((req, res) => {
      res.sendFile(path.resolve('templates/blog/list.html'));
    });
  app.route('/hujunhao/hzyw/*')
    .get((req, res) => {
    	res.sendFile(path.resolve(req.params[0]));
    }); 
  app.route('/*')
    .get((req, res) => {
        res.sendFile(path.resolve(req.params[0]));
    }); 

}
